package cn.hbu.zlfw.patent.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
/**
 * 
 * @ClassName: PatentApply 
 * @Description: 专利交底书
 * @author 王鹏伟<1223443289@qq.com>
 * @date 2017年11月2日 下午7:37:39  
 * @version V1.0
 */
@Entity
@Table(name="t_patent_apply")
public class PatentApply implements Serializable{

	private static final long serialVersionUID = 5875064615471172266L;
	@Id
	@Column(name="id",length=32)
	@GeneratedValue(generator="UUID_KEY")
	@GenericGenerator(name="UUID_KEY",strategy="uuid.hex")
	private String id;
	
	@Column(name="techfield",nullable=false,length=3500)
	private String techfield;	//所属技术领域
	
	@Column(name="techbackground",nullable=false,length=3500)
	private String techbackground;	//技术背景
	
	@Column(name="techquestion",nullable=false,length=3500)
	private String techquestion;	//所要解决的技术问题
	
	@Column(name="techmethod",nullable=false,length=3500)
	private String techmethod;	//具体技术方案
	
	@Column(name="techeffect",nullable=false,length=3500)
	private String techeffect;	//与以往技术相比的有益效果
	
	@Column(name="pictexplain",nullable=false,length=4000)
	private String pictexplain;	//附图及简要说明（图片上传）
	
	@Column(name="uploadFileNames",length=1000)
	private String uploadFileNames;	//附件名字，多个名字之间用逗号隔开
	
	@Column(name="delState",length=20,nullable=false)
	private Integer delState;	//删除状态 1表示已删除，0表示未删除
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="createTime",nullable=false)
	private Date createTime;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="updateTime",nullable=false)
	private Date updateTime;
	
	@ManyToOne(cascade= {CascadeType.MERGE,CascadeType.PERSIST})	//级联策略
	@JoinColumn(name="p_id")
	private Patent patent;
	
	public Patent getPatent() {
		return patent;
	}

	public void setPatent(Patent patent) {
		this.patent = patent;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTechfield() {
		return techfield;
	}

	public void setTechfield(String techfield) {
		this.techfield = techfield;
	}

	public String getTechbackground() {
		return techbackground;
	}

	public void setTechbackground(String techbackground) {
		this.techbackground = techbackground;
	}
	
	public String getTechquestion() {
		return techquestion;
	}

	public void setTechquestion(String techquestion) {
		this.techquestion = techquestion;
	}

	public String getTechmethod() {
		return techmethod;
	}

	public void setTechmethod(String techmethod) {
		this.techmethod = techmethod;
	}

	public String getTecheffect() {
		return techeffect;
	}

	public void setTecheffect(String techeffect) {
		this.techeffect = techeffect;
	}

	public String getPictexplain() {
		return pictexplain;
	}

	public void setPictexplain(String pictexplain) {
		this.pictexplain = pictexplain;
	}

	public String getUploadFileNames() {
		return uploadFileNames;
	}

	public void setUploadFileNames(String uploadFileNames) {
		this.uploadFileNames = uploadFileNames;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	public Integer getDelState() {
		return delState;
	}

	public void setDelState(Integer delState) {
		this.delState = delState;
	}
	@Override
	public String toString() {
		return "PatentApply [id=" + id + ", techfield=" + techfield + ", techbackground=" + techbackground
				+ ", techquestion=" + techquestion + ", techmethod=" + techmethod + ", techeffect=" + techeffect
				+ ", pictexplain=" + pictexplain + ", uploadFileNames=" + uploadFileNames + ", delState=" + delState
				+ ", createTime=" + createTime + ", updateTime=" + updateTime + "]";
	}

}
